// src/types/Menu.ts
// 通用参数响应
export interface Response {
  success: boolean
  code: string
  message: string
  data: Menu[] | object
}

//菜单树参数
export interface GetMenuListAsyncParams {
  IsEnabled: boolean
  IsVisible: boolean
}

// 菜单数据类型
export interface Menu {
  id: number
  path: string
  parentMenuId: number | null
  code: string
  component: string
  meta: {
    title: string
    icon: string
    isVisible: boolean
    isEnabled: boolean
    menuType: number
    sortIndex: number
    description: string
  }
  children: Menu[]
}

// 菜单列表响应
export interface MenuListResponse extends Response {
  data: Menu[]
}

// 添加菜单参数
export interface AddMenuAsyncParams {
  ParentMenuId: number
  MenuName: string
  MenuCode: string
  MenuType: number
  MenuPath: string
  MenuIcon: string
  ComponentName: string
  SortIndex: number
  Description: string
  IsEnabled: boolean
  IsVisible: boolean
}

// 修改菜单参数
export interface UpdateMenuAsyncParams {
  ParentMenuId: number
  MenuName: string
  MenuCode: string
  MenuType: number
  MenuPath: string
  MenuIcon: string
  ComponentName: string
  SortIndex: number
  Description: string
  IsEnabled: boolean
  IsVisible: boolean
}

export interface GetDynamicRouterAsyncParams {
  userId: number
}
